<%@page pageEncoding="utf-8" contentType="text/html; charset=utf-8" %>
<%@ include file="/home/include/init_home.jsp" %>
<%
	HashList code001	= CommonUtil.getCodeList("001");	//섬코드
	HashList code002	= CommonUtil.getCodeList("002");	//호텔구분
	HashList code119	= CommonUtil.getCodeList("119");	//견적구분
	HashList code120	= CommonUtil.getCodeList("120");	//견적의뢰상태


	String s_req_dt			= StringUtil.nvl(request.getParameter("s_req_dt"));
	String s_start_dt		= StringUtil.nvl(request.getParameter("s_start_dt"));
	String s_req_status		= StringUtil.nvl(request.getParameter("s_req_status"));
	String s_customer_name	= StringUtil.toHan(request.getParameter("s_customer_name"));
	String s_email_addr		= StringUtil.toHan(request.getParameter("s_email_addr"));
	String s_phone_no		= StringUtil.nvl(request.getParameter("s_phone_no"));
	String curr_page		= StringUtil.nvl(request.getParameter("curr_page"),"1");

	String search_url		= "./reqList.jsp?pmenu_id="+pmenu_id+"&menu_id="+menu_id;

	HashMap infos = new HashMap();
	infos.put("req_dt",			s_req_dt);
	infos.put("start_dt",		s_start_dt);
	infos.put("req_status",		s_req_status);
	infos.put("customer_name",	s_customer_name);
	infos.put("email_addr",		s_email_addr);
	infos.put("phone_no",		s_phone_no);
	infos.put("curr_page", 		curr_page);

	HomeDAO dao 		= new HomeDAO();
	HashList list 		= dao.selectReqList(infos);

	int totalCount		= dao.selectReqCount(infos);

	BoardDAO boardDAO	= new BoardDAO();
	int totalPage			= boardDAO.getTotalPage(totalCount);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><%= HOME_NAME %></title>
<style type="text/css">
</style>
<link href="../css/home.css" rel="stylesheet" type="text/css">
</head>

<body>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <%@ include file="/home/include/top_menu.jsp" %>
  <tr>
    <td valign="top" align="center" class="sub_con"><table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
      <!--좌측네비 시작-->
        <%@ include file="/home/include/left_menu.jsp" %>
        <!--좌측네비 끝-->
        <td width="50"></td>
        <!--컨텐츠 시작-->
        <td valign="top" align="left"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="66%"><img src="../images/sub/09_title_01.gif" alt="고객센터" width="101" height="31" /><img src="../images/sub/09_title_sub.gif" width="272" height="18" /></td>
                <td width="34%" align="right" valign="bottom"></td>
              </tr>
            </table></td>
          </tr>
          <tr>
            <td height="5"><img src="../images/sub/sub_line.gif" width="723" height="5" /></td>
          </tr>
          <tr>
            <td height="30"></td>
          </tr>
          <tr>
            <td class="sub_title"><%= menu_name %></td>
          </tr>
          <tr>
            <td height="40"></td>
          </tr>
          <tr>
          	<td height="18"></td>
            </tr>
            <tr>
            <td><table width="700" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td colspan="6" height="2" bgcolor="#999999"></td>
              </tr>
              <tr height="32">
                <th width="90" align="center">출발일</th>
                <th align="center">작성자</th>
                <th width="200" align="center">여행일정</th>
                <th width="100" align="center">1인예상금액</th>
                <th width="100" align="center">견적일</th>
                <th width="100" align="center">처리결과</th>
              </tr>
              <tr>
                <td colspan="6" height="1" bgcolor="#cccccc"></td>
              </tr>
       <%

         for (int i = 0; i < list.size(); i++) {

       %>
                      <tr>
                        <td width="90" height="34" align="center" valign="middle">
							<%= StringUtil.toDate(list.get("start_dt", i)) %>
                        </td>
                        <td align="center"><%= list.get("customer_name",i) %></td>
                        <td align="center"><%= list.get("travel_type_name",i) %></td>
                        <td align="center"><%= StringUtil.toPrice(list.get("est_amt",i)) %> 만원</td>
                        <td align="center"><%= StringUtil.toDate(list.get("req_dt",i)) %></td>
                        <td align="center">
                <%	if ("2".equals(list.get("req_status",i))) { %>
                			<img src="../images/main/realtime_complete.gif" alt="<%= list.get("req_status_name",i) %>"/>
               	<%	} else { %>
                        	<img src="../images/main/realtime_wait.gif" alt="<%= list.get("req_status_name",i) %>"/>
                <%	} %>
                        </td>
                      </tr>
                      <tr>
                        <td height="1" colspan="6" class="board_line"></td>
                      </tr>
   <%

         } %>

                </table></td>
              </tr>
              <tr>
                <td height="44"></td>
              </tr>
              <tr>
                <td align="right">

				</td>
              </tr>

            </table>
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
			  <tr>
				<%= StringUtil.getPageMove(totalPage, Integer.parseInt(curr_page), search_url) %>
			  </tr>
			</table>

		</td>
          </tr>
          <tr>
          	<td height="80"></td>
          </tr>
        </table></td>
        <!--컨텐츠 끝-->
      </tr>
  <%@ include file="/home/include/footer.jsp" %>
</table>
</body>
</html>
